package cn.iocoder.yudao.module.crossborder.order.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单信息 DTO
 *
 * @author LHL
 */
@Schema(description = "RPC 服务 - 订单信息 DTO")
@Data
public class OrderDTO {

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long id;

    @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ORD202401010001")
    private String orderNo;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
    private Long userId;

    @Schema(description = "订单类型", example = "1")
    private Integer orderType;

    @Schema(description = "订单来源", example = "1")
    private Integer orderSource;

    @Schema(description = "订单状态", example = "1")
    private Integer status;

    @Schema(description = "支付状态", example = "1")
    private Integer paymentStatus;

    @Schema(description = "履约状态", example = "1")
    private Integer fulfillmentStatus;

    @Schema(description = "商品总金额", example = "100.00")
    private BigDecimal productAmount;

    @Schema(description = "运费", example = "10.00")
    private BigDecimal freightAmount;

    @Schema(description = "优惠金额", example = "5.00")
    private BigDecimal discountAmount;

    @Schema(description = "税费", example = "8.00")
    private BigDecimal taxAmount;

    @Schema(description = "订单总金额", example = "113.00")
    private BigDecimal totalAmount;

    @Schema(description = "实付金额", example = "108.00")
    private BigDecimal payAmount;

    @Schema(description = "货币类型", example = "USD")
    private String currency;

    @Schema(description = "汇率", example = "6.8")
    private BigDecimal exchangeRate;

    @Schema(description = "收货人姓名", example = "张三")
    private String receiverName;

    @Schema(description = "收货人电话", example = "13800138000")
    private String receiverPhone;

    @Schema(description = "收货地址", example = "上海市浦东新区张江高科技园区")
    private String receiverAddress;

    @Schema(description = "收货邮编", example = "200000")
    private String receiverZipCode;

    @Schema(description = "收货国家", example = "中国")
    private String receiverCountry;

    @Schema(description = "下单时间")
    private LocalDateTime orderTime;

    @Schema(description = "支付时间")
    private LocalDateTime payTime;

    @Schema(description = "发货时间")
    private LocalDateTime shipTime;

    @Schema(description = "完成时间")
    private LocalDateTime completeTime;

    @Schema(description = "取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "取消原因", example = "用户主动取消")
    private String cancelReason;

    @Schema(description = "备注", example = "请尽快发货")
    private String remark;

    @Schema(description = "订单项列表")
    private List<OrderItemDTO> items;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}
